package com.ruoyi.etp.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.etp.mapper.EtpCustomerAnalysisMapper;
import com.ruoyi.etp.domain.EtpCustomerAnalysis;
import com.ruoyi.etp.service.IEtpCustomerAnalysisService;

/**
 * 客户分析Service业务层处理
 * 
 * @author xmj
 * @date 2025-09-12
 */
@Service
public class EtpCustomerAnalysisServiceImpl implements IEtpCustomerAnalysisService 
{
    @Autowired
    private EtpCustomerAnalysisMapper etpCustomerAnalysisMapper;

    /**
     * 查询客户分析
     * 
     * @param id 客户分析主键
     * @return 客户分析
     */
    @Override
    public EtpCustomerAnalysis selectEtpCustomerAnalysisById(Long id)
    {
        return etpCustomerAnalysisMapper.selectEtpCustomerAnalysisById(id);
    }

    /**
     * 查询客户分析列表
     * 
     * @param etpCustomerAnalysis 客户分析
     * @return 客户分析
     */
    @Override
    public List<EtpCustomerAnalysis> selectEtpCustomerAnalysisList(EtpCustomerAnalysis etpCustomerAnalysis)
    {
        return etpCustomerAnalysisMapper.selectEtpCustomerAnalysisList(etpCustomerAnalysis);
    }

    /**
     * 新增客户分析
     * 
     * @param etpCustomerAnalysis 客户分析
     * @return 结果
     */
    @Override
    public int insertEtpCustomerAnalysis(EtpCustomerAnalysis etpCustomerAnalysis)
    {
        return etpCustomerAnalysisMapper.insertEtpCustomerAnalysis(etpCustomerAnalysis);
    }

    /**
     * 修改客户分析
     * 
     * @param etpCustomerAnalysis 客户分析
     * @return 结果
     */
    @Override
    public int updateEtpCustomerAnalysis(EtpCustomerAnalysis etpCustomerAnalysis)
    {
        etpCustomerAnalysis.setUpdateTime(DateUtils.getNowDate());
        return etpCustomerAnalysisMapper.updateEtpCustomerAnalysis(etpCustomerAnalysis);
    }

    /**
     * 批量删除客户分析
     * 
     * @param ids 需要删除的客户分析主键
     * @return 结果
     */
    @Override
    public int deleteEtpCustomerAnalysisByIds(Long[] ids)
    {
        return etpCustomerAnalysisMapper.deleteEtpCustomerAnalysisByIds(ids);
    }

    /**
     * 删除客户分析信息
     * 
     * @param id 客户分析主键
     * @return 结果
     */
    @Override
    public int deleteEtpCustomerAnalysisById(Long id)
    {
        return etpCustomerAnalysisMapper.deleteEtpCustomerAnalysisById(id);
    }
}
